新增一個 UI 模板 (templates/),將昨天的 index.html 以及今天的 results.html 檔案移入資料夾。預計今天完工後的專案架構圖:(先將 main.py 檔名改成 app.py,看了比較習慣XD)
AI_Nutri_Project/
├── app.py # Flask 應用程式主程式
├── credentials.json # Google OAuth 憑證
└── templates/
├── index.html # 輸入/首頁 UI
└── results.html # 分析結果 UI
食物營養及熱量分析:
飲食建議/生活方式調整:
<div class="tabs">
<button class="tab-btn active" onclick="showTab('analysis')">
食物營養及熱量分析
</button>
</div>
<div id="analysis" class="tab-content active">
<h2>這裡會顯示分析的食材</h2>
</div>
<table class="data-table">
<thead>
<tr>
<th>項目</th>
<th>詳細說明</th>
</tr>
</thead>
<tbody>
<tr>
<td>1.</td>
<td></td>
</tr>
<tr>
<td>2.</td>
<td></td>
</tr>
</tbody>
</table>
<button class="tab-btn" onclick="showTab('advice')">飲食建議</button>
<div id="advice" class="tab-content">
<h2>這裡會顯示飲食建議的結論</h2>
<ul>
<li>1.</li>
<li>2.</li>
</ul>
</div>
跟昨天的 index 一樣,可以再增加自己想要的功能